const routes = [
  {
    path: '/',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      { name: 'index', path: '', component: () => import('pages/Index.vue'), meta: { guest: true } },
      { name: 'cates', path: 'cates', component: () => import('pages/Cates.vue'), meta: { guest: true } },
      { name: 'detail', path: 'detail/:id', component: () => import('pages/Detail.vue'), meta: { guest: true } },
      { name: 'submit', path: 'submit', component: () => import('pages/Submit.vue'), meta: { auth: true } },
      { name: 'msgbox', path: 'msgbox', component: () => import('pages/MsgBox.vue'), meta: { auth: true } },
      { name: 'me', path: 'me', component: () => import('pages/Me.vue'), meta: { auth: true } },
      { name: 'find_people', path: 'find_people', component: () => import('pages/FindPeople.vue'), meta: { auth: true } },
      { name: 'login', path: 'login', component: () => import('pages/Login.vue'), meta: { guest: true } }
    ]
  },
  {
    path: '/news',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      { name: 'news', path: '', component: () => import('pages/News.vue'), meta: { guest: true } },
      { name: 'ndetail', path: 'detail/:id', component: () => import('pages/NewsDetail.vue'), meta: { guest: true } }
    ]
  },

  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/Error404.vue')
  }
]

export default routes
